﻿
using System;
using System.Drawing;

namespace GECS.Object {
	
	/// <summary>
	/// A tile is a type of object which just sit's there and doesn't do anything.
	/// Often used to decorate maps or for fake wall's etc., Note that they cannot
	/// be destroyed while the map is running and they are not animated too.
	/// </summary>
    public class Tile {

        // Private variables
        private Image img = null;
        // The positions
        private int x = 0;
        private int y = 0;

        /// <summary>
        /// Constructs a new tile with an image at a specified position.
        /// </summary>
        /// <param name="img">The tile image.</param>
        /// <param name="x">The x-position.</param>
        /// <param name="y">The y-position.</param>
        public Tile(Image img, int x, int y) {
            this.img = img;
            this.x = x;
            this.y = y;
        }

        /// <summary>
        /// Gets you the tile image.
        /// </summary>
        public Image Image {
            get {
                return img;
            }
        }

        /// <summary>
        /// Gets you the x-position.
        /// </summary>
        public int X {
            get {
                return x;
            }
        }

        /// <summary>
        /// Gets you the y-position.
        /// </summary>
        public int Y {
            get {
                return y;
            }
        }
        
        /// <summary>
        /// Gets you the width of this tile.
        /// </summary>
        public int Width {
        	get {
        		return img.Width;
        	}
        }
        
        /// <summary>
        /// Gets you the height of this tile.
        /// </summary>
        public int Height {
        	get {
        		return img.Height;
        	}
        }

    }
	
}
